<{include file="common/header.tpl"}> <section id="spread_one" class="column" style="width:87%">
		<{if $name == NULL}>
			<h4 class="alert_info">请输入要查询的软件，和渠道，暂时不支持渠道模糊查询.</h4>
		<{else}>
			<h4 class="alert_info"><img src="<{$icon_url}>" width="40"> &nbsp; 软件：<{$name}> || 包名：<{$pname}></h4>
			<canvas id="canvas" height="200" width="800"></canvas>
		<{/if}>
		<{include file="admin/download/app_search.tpl"}>
        <article class="module width_3_quarter">
        <header>
    	<h3>合计下载次数:<{$data.sums}></h3>
        </header>
		<div class="tab_container">
			<div id="tab1" class="tab_content"> <!-- <div class="channel_wrap" style="display:none">
					<span class="dl">
						<input type="checkbox" id="form_channel_one" class="cb"><label 
for="form_channel_one">渠道一</label>
					</span>
					<span class="dl">
						<input type="checkbox" id="form_channel_five" class="cb"><label 
for="form_channel_five">渠道五</label>
					</span>
					
					<div class="checkall_wrap">
						<input type="checkbox" class="check_all" id="check_all"><label 
for="check_all">全选</label>
					</div>
				</div> -->
			<table class="tablesorter" cellspacing="0">
			<thead>
				<tr>
    				<th>日期</th>
    				<th>软件名称</th>
    				<th>包名</th>
    				<th>渠道名称</th>
					<th>下载次数</th>
				</tr>
			</thead>
			<tbody>
				<{foreach from = $downloads item = 'v'}>
					<tr>
						<td><{$v.date}></td>
						<td><{$name}></td>
						<td><{$request.packageName}></td>
						<{if $request.channel == NULL}>
							<td>全部渠道</td>
						<{else}>
							<td><{$request.channel}></td>
						<{/if}>
						<td><{$v.counts}></td>
					</tr>
				<{/foreach}>
				 <tr>
                    <td>合计<{$data.counts}>条记录</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td>&nbsp;</td>
                    <td><{$data.sums}></td>
                </tr>
			</tbody>
			</table>
			</div><!-- end of #tab1 -->
		</div><!-- end of .tab_container -->
		</article><!-- end of content manager article -->
		<div class="clear"></div>
	</section>
	<script>

            var lineChartData = {
                labels : <{$chart_data_dates}> ,
                datasets : [
                {
		    fillColor : "rgba(151,187,205,0.5)",
                    strokeColor : "rgba(151,187,205,1)",
                    pointColor : "rgba(151,187,205,1)",
                    pointStrokeColor : "#fff",
		    scaleOverlay : true,
                    data : <{$chart_data_counts}>
                },
                ]

            }

            var myLine = new Chart(document.getElementById("canvas").getContext("2d")).Line(lineChartData);

        </script> <{include file="common/footer.tpl"}>

